<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>循环结构</title>
	</head>
	<body>
		 <div id="app">
			<h3>数据展现:{{msg.split('').reverse().join('')}}</h3>
			<input type="text" v-model="msg"><br>
			{{reverse()}} <br/>
			{{reverse()}} <br>
			{{reverse()}} <br>
			{{reverseCom}} <br>
			{{reverseCom}} <br>
			{{reverseCom}} <br>
		 </div>
		 
		 
		 <script src="../js/vue.js"> </script>
		 <script>
			const APP =new Vue({
				el: "#app",
				data: {
					msg:''
				},
				methods:{
					reverse(){
						console.log("方法执行")
						return this.msg.split('').reverse().join('')
					}
				},
				computed:{
					reverseCom(){
						console.log("计算执行")
						return this.msg.split('').reverse().join('')
					}
					
				}
			})
		 </script>
	</body>
</html>
